package com.hk.service.kyc;

import java.util.LinkedHashMap;
import java.util.List;

import com.hk.commons.HqlFilter;
import com.hk.commons.entity.Activity;
import com.hk.commons.vo.ActivityRes;

public interface IActivity {


	public Boolean pushActMsg(int id, int channel);

	/**
	 * 已读
	 * @param id
	 * @param userId
	 */
	public void read(Integer id, Long userId);

	/**
	 * 全部已读
	 * @param
	 * @param userId
	 */
	public void readAll(Integer channel, Long userId);

    public void readAllByActivityList(List<LinkedHashMap> activityResList, Long userId);

	/**
	 * 判断是否已读
	 * @param id
	 * @param userId
	 */
	public boolean isRead(Integer id, Long userId);


	public Activity findById(Integer id);

	/**
	 * 保存
	 * 
	 * @param
	 * @return
	 */
	public Boolean add(Activity u);

	/**
	 * 删除
	 * 
	 * @param
	 * @return
	 */
	public void delete(Activity u);

	/**
	 * 更新
	 * 
	 * @param
	 */
	public void update(Activity u);

	public List<Activity> findByFilter(HqlFilter hqlFilter, int pageNum,
			int pageSize);

	public List<Activity> findByFilter(HqlFilter hqlFilter);

	public Long countByFilter(HqlFilter hqlFilter);
	
	public Boolean isExist(Integer id);
	
	/**
	 * 获取已发布的活动
	 * @param
	 * @return
	 */
	public List<Activity> getActiveActivity();

	/**
	 * 获取已发布的活动
	 * @param
	 * @return
	 */
	public List<Activity> getActiveActivity(int channel, int curPage, int pageSize);

	/**
	 * 根据客户端获取不同的活动类型
	 * @param channel
	 * @return
	 */
	public List<Activity> getAllByChannel(int channel);

	public ActivityRes getRes(Activity act);

	public ActivityRes getRes(Activity act, Long userId);

	public  List<ActivityRes> getResByChannel(Integer channel);

	/**
	 * 根据渠道和位置获取活动
	 * @param channel
	 * @param location
     * @return
     */
	public  List<Activity> getResByChannelAndLocation(Integer channel, String location, Long userId);



	public List<Activity> page(int pageNo, int pageSize, List<Activity> list);


}
